<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Insert title here</title>
		<link rel="stylesheet" href="../css/reg.css" type="text/css"></link>
		<script type="text/javascript"
			src="../js/jquery-validation-1.10.0/lib/jquery-1.7.2.js"></script>
		<script type="text/javascript">  
		function checkAll()
		{
			
 			var object = document.getElementsByName("selectedGoods");
 			var length = object.length;
 			var checked = document.getElementById("chkall").checked;
 			for (var i = 0; i < length; i++)
 			{
     			object[i].checked=checked;
 			}
 		}
		

		</script>
		<link rel="stylesheet" href="../css/Style.css" type="text/css"></link>
	</head>
	<body>
		<table width="980px" border="0" cellspacing="0" cellpadding="0"
			align="center">
			<tr>
				<td width="50%" height=80 rowspan=2>
					<div class=Mleft>

						<img src="../imgs/logo.gif" border=0>
					</div>
				</td>
				<td width="50%">
					<span id=AjaxShow></span>
					<br>
				</td>
			</tr>
			<tr>
				<td valign=bottom align=right>
					欢迎您：
					<strong><font color=red>沉黙de泠栤</font> </strong>
					<a href=/login.asp?Action=Logout target=_parent>退出</a>
				</td>
			</tr>
		</table>
		<table id=div border="0" cellspacing="0" cellpadding="0" align=center>
			<tr>
				<td>
					<img src=../imgs/center_top.gif>
				</td>
			</tr>
			<tr>
				<td
					style='padding: 5px; border-left: 1px #CCCCCC solid; border-right: 1px #CCCCCC solid'>
					<table border="0" cellspacing="0" cellpadding="0" align=center>
						<tr>
							<td width="155" valign=top>
								<jsp:include page="../frame/left.jsp" />
							</td>
							<td width="810" valign="top">
								<!-- right -->
								<div class="UserPath">
									您的位置：
									<a href="Index.asp">会员中心</a> &gt;&gt;
									<a href="User_ClassAD.asp?ChannelID=2">分类信息管理</a>
								</div>
								<form action="<%=path %>/changeGoods/changeGoods!deleteGoods.action" name="myform" method="post">
								<table width="100%" cellpadding="2" cellspacing="0" border="0"
									align="center" class="td1">
									
									<tbody>
										<tr>
											<td class="td4" colspan="9">
												信息管理
											</td>
										</tr>
										<tr align="center" class="td3" width="3%">
											<td>
												选择
											</td>
											<td width="3%">
												&nbsp;
											</td>
											<td>
												信息标题
											</td>
											<td width="15%">
												到期时间
											</td>
											<td width="10%">
												状态
											</td>
											<td width="10%">
												操作
											</td>
										</tr>
										<c:forEach items="${userGoods}" var="userGood">
											<tr align="center" class="td3">
												<td width="3%"> 
													<input type="checkbox" name="selectedGoods" value="${userGood.id }"/>
												</td>
												<td width="3%">
													&nbsp;
												</td>
												<td>
													<a
														href="<%=path%>/goods/showGoods!findGoodInfo.action?id=${userGood.id }">${userGood.name}</a>
												</td>
												<td width="15%">
													<fmt:formatDate value="${userGood.stopTime }" type="both" />

												</td>
												<td width="10%">
													<c:choose>
														<c:when test="${userGood.state==0}">
												待审核
												</c:when>
														<c:when test="${userGood.state==1}">
												审核未通过
												</c:when>
														<c:when test="${userGood.state==2}">
												正常
												</c:when>
														<c:when test="${userGood.state==3}">
												待审核
												</c:when>
														<c:when test="${userGood.state==4}">
												到期
												</c:when>
													</c:choose>
												</td>
												<td width="10%">
												<a href="<%=path %>/changeGoods/changeGoods!findGoodInfo.action?id=${userGood.id }">修改</a>
												</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
								<table width="100%" cellpadding="3" cellspacing="1"
									align="center" class="td5">
									<tbody>
										<tr>
											<td height="30">
												<input name="chkall" type="checkbox" id="chkall"
													value="select" onclick="checkAll()"
													style="border: 0">
												全选

												<input type="submit" name="submit" value="删除">
											</td>
											<td align="right">
											</td>
										</tr>
									</tbody>
									
								</table>
								</form>
								<table width="100%" cellpadding="3" cellspacing="0"
									align="center" class="td1">
									<tbody>

									</tbody>
								</table>
								<!-- right end -->
							</td>

						</tr>

					</table>
				</td>
			</tr>
			<tr>
				<td>
					<img src="../imgs/center_bottom.gif">
				</td>
			</tr>
		</table>


	</body>
</html>
